package a.f.h.a;

import a.c.*;
import a.d.u;
import a.f.h.a.a.g;
import a.f.j.cb;
import a.f.j.db;

public class d
  implements a.f.h.b.d
{
  public static final String b = "y.layout.orthogonal.cluster.NodeSplitter.INSETS_KEY";
  public static final String c = "y.layout.orthogonal.cluster.NodeSplitter.BORDER_INFO_KEY";
  private a.f.h.a.b.b d;
  private q e;
  private a.f.h.a.a.b f;
  private ab g;
  private cb h;
  private k i;
  private a.c.n j;
  private a.c.n k;
  private db l;
  public static int m;
  public static int n;
  
  public d(a.f.h.a.b.b paramb, ab paramab)
  {
    this.d = paramb;
    this.g = paramab;
    this.e = paramb.d();
    this.i = this.e.c(a.f.c.i.d);
    if (n == 0)
    {
      if (this.i != null)
      {
        this.j = this.e.C();
        this.e.a("y.layout.orthogonal.cluster.NodeSplitter.INSETS_KEY", this.j);
      }
      this.k = this.e.C();
      this.e.a("y.layout.orthogonal.cluster.NodeSplitter.BORDER_INFO_KEY", this.k);
    }
    this.f = paramb.b();
  }
  
  public void a(cb paramcb) {}
  
  public void a(int paramInt) {}
  
  public void a()
  {
    int i2 = n;
    int i1 = m;
    l.a(this.d, this.g);
    this.d.h();
    a.f.h.a.a.n.a(new e_(null), this.f);
    this.d.i();
    this.h = new cb(this.d.d());
    Object localObject1 = this.d.d().w();
    do
    {
      if (!((m)localObject1).e()) {
        break;
      }
      localObject2 = ((m)localObject1).a();
      a.c.d locald = this.d.c((a.c.d)localObject2);
      this.h.a((a.c.d)localObject2, locald);
      if (i1 != 0) {
        break label155;
      }
      if (i2 == 0)
      {
        if (this.d.a((a.c.d)localObject2)) {
          this.h.g((a.c.d)localObject2);
        }
        ((m)localObject1).f();
      }
    } while (i1 == 0);
    label155:
    localObject1 = this.e.v();
    do
    {
      if (!((w)localObject1).e()) {
        break;
      }
      localObject2 = ((w)localObject1).d();
      if (i1 != 0) {
        break label319;
      }
      if ((i2 != 0) || (!this.d.h((a.c.e)localObject2)))
      {
        if (i2 != 0) {
          continue;
        }
        if (!this.d.e((a.c.e)localObject2)) {}
      }
      else
      {
        this.h.c((a.c.e)localObject2);
      }
      ((w)localObject1).f();
    } while (i1 == 0);
    this.h.f();
    if (i2 == 0)
    {
      if (i2 != 0) {
        break label319;
      }
      if (this.j != null)
      {
        this.l = new d_(this.j);
        this.h.a(this.l);
      }
      this.h.a(new b_(this.k));
    }
    label319:
    localObject1 = (g)this.f.a().b().j();
    Object localObject2 = this.d.a(((g)localObject1).e()).l().a();
    this.h.a(this.h.c((a.c.d)localObject2));
    if (i2 == 0)
    {
      if (q.n) {
        i1++;
      }
    }
    else {
      m = i1;
    }
    if (q.o)
    {
      i2++;
      n = i2;
    }
  }
  
  public cb b()
  {
    return this.h;
  }
  
  public void c()
  {
    int i1 = n;
    if (i1 == 0) {
      if (this.j != null) {
        this.e.a(this.j);
      }
    }
    if (i1 == 0)
    {
      if (this.l != null) {
        this.h.b(this.l);
      }
      this.e.a(this.k);
      this.h.o();
    }
    e.a(this.d, this.g);
  }
  
  private void d()
  {
    a.f.h.a.a.n.a(new c_(null), this.f);
  }
  
  private class c_
    implements a.f.h.a.a.i
  {
    private c_() {}
    
    public void a(a.f.h.a.a.e parame)
    {
      int i = d.n;
      if (i == 0)
      {
        if (parame.d()) {
          return;
        }
        if (i != 0) {}
      }
      else if (parame.f())
      {
        return;
      }
      g localg = (g)parame;
      a.c.e locale = localg.e();
      System.out.println("Node: " + locale);
      System.out.println("Border: " + d.this.d.j(locale));
    }
    
    c_(d.0 param0)
    {
      this();
    }
  }
  
  static class b_
    implements db
  {
    a.c.n a;
    
    b_(a.c.n paramn)
    {
      this.a = paramn;
    }
    
    public void a(a.c.d paramd, a.c.d[] paramArrayOfd)
    {
      int k = d.n;
      int j = d.m;
      do
      {
        for (int i = 0; j == 0; i++)
        {
          if (i >= paramArrayOfd.length) {
            break;
          }
          this.a.a(paramArrayOfd[i], this.a.get(paramd));
        }
      } while (k != 0);
    }
    
    public void a(a.c.d[] paramArrayOfd, a.c.d paramd)
    {
      this.a.a(paramd, paramArrayOfd[0]);
    }
    
    public void a(a.c.d paramd, a.f.j.n[] paramArrayOfn1, a.f.j.n[] paramArrayOfn2) {}
    
    public void b(a.c.d paramd, a.f.j.n[] paramArrayOfn1, a.f.j.n[] paramArrayOfn2) {}
  }
  
  static class d_
    implements db
  {
    a.c.n a;
    
    d_(a.c.n paramn)
    {
      this.a = paramn;
    }
    
    public void a(a.c.d paramd, a.c.d[] paramArrayOfd)
    {
      int k = d.n;
      int j = d.m;
      do
      {
        for (int i = 0; j == 0; i++)
        {
          if (i >= paramArrayOfd.length) {
            break;
          }
          this.a.a(paramArrayOfd[i], this.a.get(paramd));
        }
      } while (k != 0);
    }
    
    public void a(a.c.d[] paramArrayOfd, a.c.d paramd)
    {
      this.a.a(paramd, paramArrayOfd[0]);
    }
    
    public void a(a.c.d paramd, a.f.j.n[] paramArrayOfn1, a.f.j.n[] paramArrayOfn2) {}
    
    public void b(a.c.d paramd, a.f.j.n[] paramArrayOfn1, a.f.j.n[] paramArrayOfn2) {}
  }
  
  private class e_
    implements a.f.h.a.a.i
  {
    private e_() {}
    
    public void a(a.f.h.a.a.e parame)
    {
      int j = d.n;
      int i = d.m;
      if (j == 0)
      {
        if (parame.d()) {
          return;
        }
        if (j != 0) {}
      }
      else if (parame.f())
      {
        return;
      }
      g localg = (g)parame;
      a.c.e locale1 = localg.e();
      ab localab1 = d.this.d.b(locale1);
      if (j == 0) {
        if (localab1.size() == 0) {
          return;
        }
      }
      ab localab2 = new ab();
      bb localbb = new bb();
      m localm = localab1.l();
      localm.i();
      label212:
      label216:
      do
      {
        if (!localm.e()) {
          break;
        }
        a.c.d locald2 = localm.a();
        a.c.d locald1 = d.this.d.c(locald2);
        a.c.d locald3 = d.this.d.i(locald2);
        if (j == 0) {
          if (locald3.f() == locale1)
          {
            locald4 = locald3;
            if (j != 0) {
              break label216;
            }
            locald3 = d.this.d.c(locald3);
            if (i == 0) {
              break label212;
            }
          }
        }
        a.c.d locald4 = d.this.d.c(locald3);
        localObject1 = d.this.e.i();
        d.this.d.g((a.c.e)localObject1);
        d.this.e.a(locald2, (a.c.e)localObject1, locald2.f());
        d.this.e.a(locald3, (a.c.e)localObject1, locald3.f());
        d.this.e.a(locald1, locald1.e(), (a.c.e)localObject1);
        d.this.e.a(locald4, locald4.e(), (a.c.e)localObject1);
        localab3 = d.this.d.a((a.c.e)localObject1);
        localab3.b(locald2);
        localab3.b(locald3);
        localbb.b(localObject1);
        localm.g();
      } while (i == 0);
      Object localObject1 = null;
      if ((j != 0) || (d.this.i != null)) {
        localObject1 = u.a(d.this.i.get(locale1));
      }
      ab localab3 = new ab();
      Object localObject2 = localbb.n();
      w localw = localbb.l();
      do
      {
        if (!localw.e()) {
          break;
        }
        a.c.e locale2 = localw.d();
        a.c.d locald5 = d.this.e.a((a.c.e)localObject2, locale2);
        if (j != 0) {
          return;
        }
        if (i != 0) {
          break label687;
        }
        if (d.this.i != null) {
          d.this.j.a(locald5, localObject1);
        }
        d.this.d.u(locald5);
        d.this.k.a(locald5, locale1);
        a.c.d locald6 = d.this.d.k(locald5);
        d.this.d.u(locald6);
        d.this.k.a(locald6, locale1);
        d.this.d.c().g(locald6);
        localab3.b(locald5);
        ab localab4 = d.this.d.a((a.c.e)localObject2);
        d.this.d.a((a.c.e)localObject2, localab4.n(), locald5);
        localab4 = d.this.d.a(locale2);
        d.this.d.a(locale2, localab4.m(), locald6);
        localObject2 = locale2;
        localw.f();
      } while (i == 0);
      d.this.d.e(locale1, localab3);
      if (j == 0) {
        label687:
        d.this.e.d(locale1);
      }
    }
    
    e_(d.0 param0)
    {
      this();
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.h.a.d

 * JD-Core Version:    0.7.0.1

 */